package top.healthylife.gateway.platform.fh.dto.unify.req;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author : GaoZeXi
 * @date 2021/11/1 11:24
 */
@Data
@Accessors(chain = true)
@ApiModel("法海关联方查询统一入参")
public abstract class FhReqRelatedPartyQueryUnifyDto extends FhReqQueryUnifyDto {

    @ApiModelProperty(value = "数据类型", example = "", required = false,notes = "具体参数见子类枚举")
    protected String dataType;

    @ApiModelProperty(value = "关联方名称", example = "黄金杯", required = true)
    protected String name;

    @ApiModelProperty(value = "身份证", example = "359002197610292534", required = true)
    protected String idcardNo;


    /**
     * 校验子类的dataType是否合法
     */
    public void checkDataType(){
        checkDataType(this.dataType);
    }


    /**
     * 校验参数的dataType是否合法
     *
     * @param dataType 数据类型
     */
    public abstract void checkDataType(String dataType);

}
